/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.sna.view;

import br.com.sna.control.FuncionarioActionControl;
import br.com.sna.controller.implement.FuncionarioImplements;
import br.com.sna.model.Funcionario;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author ritacosta
 */
public class FuncionarioFrm extends javax.swing.JFrame {

    /**
     * Creates new form Prestador
     */
    private FuncionarioActionControl funcionarioActionControl;
    public DefaultTableModel tmFuncionario = new DefaultTableModel(null, new String[]{"Id", "Nome", "Senha"});
    List<Funcionario> funcionarios;
    FuncionarioImplements funcionarioImplements;
    ListSelectionModel lsmFuncionario;

    public FuncionarioFrm() {
        initComponents();
        funcionarioImplements = new FuncionarioImplements();
        funcionarioActionControl = new FuncionarioActionControl(this);
    }

    private void searchFuncionario() {
        funcionarios = funcionarioImplements.listaFuncionario();
        mostrarFuncionarios(funcionarios);
    }

    private void mostrarFuncionarios(List<Funcionario> funcionarios) {
        while (tmFuncionario.getRowCount() < 0) {
            tmFuncionario.removeRow(0);
        }
        if (funcionarios.size() == 0) {
            JOptionPane.showMessageDialog(null, "Não foi encontrado nenhum registro!");
        } else {
            String[] campos = new String[]{null, null, null};
            for (int i = 0; i < funcionarios.size(); i++) {
                tmFuncionario.addRow(campos);
                tmFuncionario.setValueAt(funcionarios.get(i).getId(), i, 0);
                tmFuncionario.setValueAt(funcionarios.get(i).getNome(), i, 1);
                tmFuncionario.setValueAt(funcionarios.get(i).getSenha(), i, 2);
            }
        }
    }
    
    private void tbFuncionarioLinhaSelecionada(JTable tb) {
        if (tb.getSelectedRow() != -1) {
            labelId.setText(String.valueOf(funcionarios.get(tb.getSelectedRow()).getId()));
            txtNomeFuncionario.setText(funcionarios.get(tb.getSelectedRow()).getNome());
            ptxtSenhaFuncionario.setText(funcionarios.get(tb.getSelectedRow()).getSenha());
        } else {
            labelId.setText("");
            txtNomeFuncionario.setText("");
            ptxtSenhaFuncionario.setText("");
        }
    }
    

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTextField1 = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        Funcionário = new javax.swing.JLabel();
        jToolBar1 = new javax.swing.JToolBar();
        btIncluirFuncionario = new javax.swing.JButton();
        btPrepararAlterarFuncionario = new javax.swing.JButton();
        btExcluirFuncionario = new javax.swing.JButton();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        btSalvarFuncionario = new javax.swing.JButton();
        btAlterar = new javax.swing.JButton();
        btFinalizarFuncionario = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        labelId = new javax.swing.JLabel();
        txtNomeFuncionario = new javax.swing.JTextField();
        ptxtSenhaFuncionario = new javax.swing.JPasswordField();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbFuncionario = new javax.swing.JTable();
        jToolBar2 = new javax.swing.JToolBar();
        btPesquisar = new javax.swing.JButton();
        btLimpar = new javax.swing.JButton();

        jTextField1.setText("jTextField1");

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Funcionário");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        Funcionário.setFont(new java.awt.Font("Calibri", 0, 24)); // NOI18N
        Funcionário.setText("Funcionário");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Funcionário, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(Funcionário)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jToolBar1.setRollover(true);

        btIncluirFuncionario.setText("Incluir");
        btIncluirFuncionario.setFocusable(false);
        btIncluirFuncionario.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btIncluirFuncionario.setMaximumSize(new java.awt.Dimension(60, 35));
        btIncluirFuncionario.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btIncluirFuncionario);

        btPrepararAlterarFuncionario.setText("Modificar");
        btPrepararAlterarFuncionario.setFocusable(false);
        btPrepararAlterarFuncionario.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPrepararAlterarFuncionario.setMaximumSize(new java.awt.Dimension(60, 35));
        btPrepararAlterarFuncionario.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btPrepararAlterarFuncionario);

        btExcluirFuncionario.setText("Excluir");
        btExcluirFuncionario.setFocusable(false);
        btExcluirFuncionario.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btExcluirFuncionario.setMaximumSize(new java.awt.Dimension(60, 35));
        btExcluirFuncionario.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btExcluirFuncionario);
        jToolBar1.add(jSeparator1);

        btSalvarFuncionario.setText("Salvar");
        btSalvarFuncionario.setEnabled(false);
        btSalvarFuncionario.setFocusable(false);
        btSalvarFuncionario.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btSalvarFuncionario.setMaximumSize(new java.awt.Dimension(60, 35));
        btSalvarFuncionario.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btSalvarFuncionario);

        btAlterar.setText("Alterar");
        btAlterar.setEnabled(false);
        btAlterar.setFocusable(false);
        btAlterar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btAlterar.setMaximumSize(new java.awt.Dimension(60, 35));
        btAlterar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btAlterar);

        btFinalizarFuncionario.setText("Finalizar");
        btFinalizarFuncionario.setEnabled(false);
        btFinalizarFuncionario.setFocusable(false);
        btFinalizarFuncionario.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btFinalizarFuncionario.setMaximumSize(new java.awt.Dimension(60, 35));
        btFinalizarFuncionario.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar1.add(btFinalizarFuncionario);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Insira dados para cadastro"));

        jLabel3.setText("Nome:");

        jLabel4.setText("Senha:");

        jLabel2.setText("Id:");

        txtNomeFuncionario.setEnabled(false);

        ptxtSenhaFuncionario.setEnabled(false);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3))
                .addGap(21, 21, 21)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtNomeFuncionario)
                    .addComponent(ptxtSenhaFuncionario)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(labelId, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 120, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel2)
                    .addComponent(labelId, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNomeFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel4)
                    .addComponent(ptxtSenhaFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(26, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        tbFuncionario.setModel(tmFuncionario);
        tbFuncionario.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmFuncionario = tbFuncionario.getSelectionModel();
        lsmFuncionario.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent e) {
                if(! e.getValueIsAdjusting()){
                    tbFuncionarioLinhaSelecionada(tbFuncionario);
                }
            }
        });
        jScrollPane1.setViewportView(tbFuncionario);

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(135, 135, 135))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(283, 283, 283))
        );

        jToolBar2.setRollover(true);

        btPesquisar.setText("Listar Funcionarios");
        btPesquisar.setFocusable(false);
        btPesquisar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btPesquisar.setMaximumSize(new java.awt.Dimension(120, 35));
        btPesquisar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btPesquisarActionPerformed(evt);
            }
        });
        jToolBar2.add(btPesquisar);

        btLimpar.setText("Limpar");
        btLimpar.setFocusable(false);
        btLimpar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btLimpar.setMaximumSize(new java.awt.Dimension(120, 35));
        btLimpar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jToolBar2.add(btLimpar);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 331, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 354, Short.MAX_VALUE)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jToolBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)
                    .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(14, 14, 14))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPesquisarActionPerformed
        searchFuncionario();
    }//GEN-LAST:event_btPesquisarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FuncionarioFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FuncionarioFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FuncionarioFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FuncionarioFrm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FuncionarioFrm().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel Funcionário;
    private javax.swing.JButton btAlterar;
    private javax.swing.JButton btExcluirFuncionario;
    private javax.swing.JButton btFinalizarFuncionario;
    private javax.swing.JButton btIncluirFuncionario;
    private javax.swing.JButton btLimpar;
    private javax.swing.JButton btPesquisar;
    private javax.swing.JButton btPrepararAlterarFuncionario;
    private javax.swing.JButton btSalvarFuncionario;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar2;
    private javax.swing.JLabel labelId;
    private javax.swing.JPasswordField ptxtSenhaFuncionario;
    private javax.swing.JTable tbFuncionario;
    private javax.swing.JTextField txtNomeFuncionario;
    // End of variables declaration//GEN-END:variables

    public javax.swing.JButton getBtAlterarFuncionario() {
        return btPrepararAlterarFuncionario;
    }

    public void setBtAlterarFuncionario(javax.swing.JButton btAlterarFuncionario) {
        this.btPrepararAlterarFuncionario = btAlterarFuncionario;
    }

    public javax.swing.JButton getBtExcluirFuncionario() {
        return btExcluirFuncionario;
    }

    public void setBtExcluirFuncionario(javax.swing.JButton btExcluirFuncionario) {
        this.btExcluirFuncionario = btExcluirFuncionario;
    }

    public javax.swing.JButton getBtFinalizarFuncionario() {
        return btFinalizarFuncionario;
    }

    public void setBtFinalizarFuncionario(javax.swing.JButton btFinalizarFuncionario) {
        this.btFinalizarFuncionario = btFinalizarFuncionario;
    }

    public javax.swing.JButton getBtIncluirFuncionario() {
        return btIncluirFuncionario;
    }

    public void setBtIncluirFuncionario(javax.swing.JButton btIncluirFuncionario) {
        this.btIncluirFuncionario = btIncluirFuncionario;
    }

    public javax.swing.JButton getBtSalvarFuncionario() {
        return btSalvarFuncionario;
    }

    public void setBtSalvarFuncionario(javax.swing.JButton btSalvarFuncionario) {
        this.btSalvarFuncionario = btSalvarFuncionario;
    }

    public javax.swing.JLabel getLabelId() {
        return labelId;
    }

    public void setLabelId(javax.swing.JLabel labelId) {
        this.labelId = labelId;
    }

    public javax.swing.JPasswordField getPtxtSenhaFuncionario() {
        return ptxtSenhaFuncionario;
    }

    public void setPtxtSenhaFuncionario(javax.swing.JPasswordField ptxtSenhaFuncionario) {
        this.ptxtSenhaFuncionario = ptxtSenhaFuncionario;
    }

    public javax.swing.JTable getTbFuncionario() {
        return tbFuncionario;
    }

    public void setTbFuncionario(javax.swing.JTable tbFuncionario) {
        this.tbFuncionario = tbFuncionario;
    }

    public javax.swing.JTextField getTxtNomeFuncionario() {
        return txtNomeFuncionario;
    }

    public void setTxtNomeFuncionario(javax.swing.JTextField txtNomeFuncionario) {
        this.txtNomeFuncionario = txtNomeFuncionario;
    }

    public javax.swing.JButton getBtPesquisar() {
        return btPesquisar;
    }

    public void setBtPesquisar(javax.swing.JButton btPesquisar) {
        this.btPesquisar = btPesquisar;
    }

    public javax.swing.JButton getBtAlterar() {
        return btAlterar;
    }

    public void setBtAlterar(javax.swing.JButton btAlterar) {
        this.btAlterar = btAlterar;
    }

    public javax.swing.JButton getBtPrepararAlterarFuncionario() {
        return btPrepararAlterarFuncionario;
    }

    public void setBtPrepararAlterarFuncionario(javax.swing.JButton btPrepararAlterarFuncionario) {
        this.btPrepararAlterarFuncionario = btPrepararAlterarFuncionario;
    }

    public javax.swing.JButton getBtLimpar() {
        return btLimpar;
    }

    public void setBtLimpar(javax.swing.JButton btLimpar) {
        this.btLimpar = btLimpar;
    }
    
    
}
